package com.example.superoa.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.List;


/**
 * The persistent class for the leave_type database table.
 * 
 */
@Entity
@Table(name="leave_type")
@NamedQuery(name="LeaveType.findAll", query="SELECT l FROM LeaveType l")
public class LeaveType implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="LT_ID")
	private int ltId;

	@Column(name="LT_DAN")
	private String ltDan;

	@Column(name="LT_NAME")
	private String ltName;

	@Column(name="LT_QI")
	private int ltQi;

	@Column(name="LT_ZUI")
	private BigDecimal ltZui;

	//bi-directional many-to-one association to Qingjia
	@OneToMany(mappedBy="leaveType")
	private List<Qingjia> qingjias;

	public LeaveType() {
	}

	public int getLtId() {
		return this.ltId;
	}

	public void setLtId(int ltId) {
		this.ltId = ltId;
	}

	public String getLtDan() {
		return this.ltDan;
	}

	public void setLtDan(String ltDan) {
		this.ltDan = ltDan;
	}

	public String getLtName() {
		return this.ltName;
	}

	public void setLtName(String ltName) {
		this.ltName = ltName;
	}

	public int getLtQi() {
		return this.ltQi;
	}

	public void setLtQi(int ltQi) {
		this.ltQi = ltQi;
	}

	public BigDecimal getLtZui() {
		return this.ltZui;
	}

	public void setLtZui(BigDecimal ltZui) {
		this.ltZui = ltZui;
	}

	public List<Qingjia> getQingjias() {
		return this.qingjias;
	}

	public void setQingjias(List<Qingjia> qingjias) {
		this.qingjias = qingjias;
	}

	public Qingjia addQingjia(Qingjia qingjia) {
		getQingjias().add(qingjia);
		qingjia.setLeaveType(this);

		return qingjia;
	}

	public Qingjia removeQingjia(Qingjia qingjia) {
		getQingjias().remove(qingjia);
		qingjia.setLeaveType(null);

		return qingjia;
	}

}